package com.enlorenz.common.geo.map.arcgis;

import com.enlorenz.common.geo.map.base.AbstractTileFilePathCreator;
import com.enlorenz.common.geo.map.base.FileWrapper;
import com.enlorenz.common.geo.map.base.TileWrapper;

public class ArcgisTileFilePathCreator extends AbstractTileFilePathCreator{
	//瓦片文件后缀
	private final String TILE_PIC_SUFFIX=".png";
	
	public FileWrapper createWrapper(String baseFilePath,TileWrapper gtw){
		gtw=ArcgisNameTransform.google2Arcgis(gtw);
		return super.createWrapper(baseFilePath, gtw);
	}
	
	
	
	public String createTileFileName(TileWrapper gtw){
		return gtw.getYtile()+TILE_PIC_SUFFIX;
	}
	
	/**
	 * 创建文件夹目录
	 * @param baseFilePath
	 * @param gtw
	 * @return
	 */
	public String createTileDirPath(String baseFilePath,TileWrapper gtw){
		return baseFilePath+FILE_SPLITOR+gtw.getZoom()+FILE_SPLITOR+gtw.getXtile();
	}
}
